package com.ruoyi.sj.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.sj.mapper.RedReceiveMapper;
import com.ruoyi.sj.domain.RedReceive;
import com.ruoyi.sj.service.IRedReceiveService;
import com.ruoyi.common.support.Convert;

/**
 * 接收红包（金包） 服务层实现
 * 
 * @author tyc@yanyu.com
 * @date 2018-12-28
 */
@Service
public class RedReceiveServiceImpl implements IRedReceiveService 
{
	@Autowired
	private RedReceiveMapper redReceiveMapper;

	/**
     * 查询接收红包（金包）信息
     * 
     * @param id 接收红包（金包）ID
     * @return 接收红包（金包）信息
     */
    @Override
	public RedReceive selectRedReceiveById(Integer id)
	{
	    return redReceiveMapper.selectRedReceiveById(id);
	}
	
	/**
     * 查询接收红包（金包）列表
     * 
     * @param redReceive 接收红包（金包）信息
     * @return 接收红包（金包）集合
     */
	@Override
	public List<RedReceive> selectRedReceiveList(RedReceive redReceive)
	{
	    return redReceiveMapper.selectRedReceiveList(redReceive);
	}
	
    /**
     * 新增接收红包（金包）
     * 
     * @param redReceive 接收红包（金包）信息
     * @return 结果
     */
	@Override
	public int insertRedReceive(RedReceive redReceive)
	{
	    return redReceiveMapper.insertRedReceive(redReceive);
	}
	
	/**
     * 修改接收红包（金包）
     * 
     * @param redReceive 接收红包（金包）信息
     * @return 结果
     */
	@Override
	public int updateRedReceive(RedReceive redReceive)
	{
	    return redReceiveMapper.updateRedReceive(redReceive);
	}

	/**
     * 删除接收红包（金包）对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteRedReceiveByIds(String ids)
	{
		return redReceiveMapper.deleteRedReceiveByIds(Convert.toStrArray(ids));
	}
	
}
